package com.design.observer.person;

import com.design.observer.Observers;

/**
 * 观察者-人类
 * 属性：名字
 */
public class Person implements Observers {
    private final String name;

    public Person(String name) {
        this.name = name;
    }

    @Override
    public void update(float price) {
        System.out.println(name + "关注的杯子价格已更新为" + price);
    }
}